Release 10.1A: OpenEdge Development:
Messaging and ESB


Publish-and-Subscribe messaging

In the Publish-and-Subscribe, or Pub/Sub, JMS messaging domain, a message producer is a publisher and a Message Consumer is a subscriber. A publisher sends messages to a destination called a topic. Publishers publish messages to topics and subscribers subscribe to topics. A subscriber subscribes to topics and receives all messages published to those topics. All subscribers can consume messages for that topic. An application can be both a publisher and a subscriber, and a single publisher can send a message to multiple subscribers.

Sending and receiving messages

Table 2–3 describes the tasks performed to send and receive messages using PTP messaging.

Table 2–3: Pub/Sub messaging tasks 
Step
Who
What
1.
Subscriber
Subscribes to a topic. (A subscriber must exist prior to a message being published in order to consume the message.)
2.
Session
Creates and populates a message.
3.
Publisher
Publishes the message to the topic.
4.
Message broker
Delivers the message to the subscribers.
5.
Subscriber
Consumes the message.
6.
Subscriber
Acknowledges message receipt to the broker.
7.
Message broker
Deletes the message after all subscribers acknowledged it.

Pub/Sub messaging options and features

Table 2–4 describes the features of the Pub/Sub messaging model.

Table 2–4: Pub/Sub messaging features 
Feature
Description
Topic hierarchy

Topics can be organized into hierarchies.

Guaranteed message delivery
A topic subscription can be durable; message remains when subscriber disconnects.
Request and reply
Ensures the subscribers send a message back to the publisher when a messages is received.
Message selector
Filters the messages received from a topic.

For more information, see the "Using PUB/SUB messaging" section.

Integrating with the native 4GL publish-and-subscribe mechanism

The JMS Pub/Sub model complements the Progress 4GL publish-and-subscribe syntax (named events) for distributed applications. As shown in a Figure 2–1, a 4GL program written with the local Progress 4GL syntax for publish-and-subscribe can be distributed with the addition of local and remote gateway object modules. Using this model, a 4GL programmer can integrate the local application with the SonicMQ functionality without recompiling. Progress Software Corporation recommends this model but does not provide specific software to implement it, except for the sample application files. (See Appendix B "Messaging Examples.")

Figure 2–1: Gateway model


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095